using System;
using System.Diagnostics;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;
namespace MicroMsg.UI.UserContrl
{
	public class SnsPostImageContainer : UserControl
	{
		public delegate void SnsPostImageContainer_Click(object sender, object object_0);
		internal Button LayoutRoot;
		internal Image postImg;
		internal Image DelImg;
		private bool _contentLoaded;
		public event SnsPostImageContainer.SnsPostImageContainer_Click ItemClick;
		public SnsPostImageContainer()
		{
			this.InitializeComponent();
			base.add_Loaded(new RoutedEventHandler(this.SnsPostImageContainer_Loaded));
		}
		private void SnsPostImageContainer_Loaded(object sender, RoutedEventArgs e)
		{
		}
		public void SetSource(ImageSource imageSource_0)
		{
			this.postImg.set_Source(imageSource_0);
		}
		public void SetDeleteState(bool deleteState)
		{
			if (this.DelImg == null)
			{
				return;
			}
			if (deleteState)
			{
				this.DelImg.set_Visibility(0);
				return;
			}
			this.DelImg.set_Visibility(1);
		}
		public bool IsDeleteState()
		{
			return this.DelImg != null && this.DelImg.get_Visibility() == 0;
		}
		private void Button_Click(object sender, RoutedEventArgs e)
		{
			if (this.ItemClick != null)
			{
				this.ItemClick(this, null);
			}
		}
		[DebuggerNonUserCode]
		public void InitializeComponent()
		{
			if (this._contentLoaded)
			{
				return;
			}
			this._contentLoaded = true;
			Application.LoadComponent(this, new Uri("/MicroMsg;component/Source/Plugin/Sns/Common/UI/UploadAndPost/SnsPostImageContainer.xaml", 2));
			this.LayoutRoot = (Button)base.FindName("LayoutRoot");
			this.postImg = (Image)base.FindName("postImg");
			this.DelImg = (Image)base.FindName("DelImg");
		}
	}
}
